home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / mus / edit / WaveTracer.lha / WaveTracer / Doc / Developer / Sources / ModIncl.h < prev    next >
C/C++ Source or Header  |  1995-06-21  |  875b  |  53 lines

  1. //procedure MESSAGEHANDLE & CREATEPORTS
  2.  
  3. #define COPYRIGHT "© by Oxygenic & VWP"
  4.  
  5. #include <dh2:WaveTracer_DS/WaveTracer_Sources/WaveTracer/WTIncl.h>
  6.  
  7. MsgPort *MyPort,*WTPort;
  8. WTStdMsg *MyWTStdMsg;
  9.  
  10.  
  11. void MESSAGEHANDLE(void)
  12.  
  13. {
  14. MyWTStdMsg->wt_Node.mn_ReplyPort=MyPort;
  15. MyWTStdMsg->wt_Node.mn_Length=sizeof(WTStdMsg);
  16. MyWTStdMsg->wt_Node.mn_Node.ln_Type=NT_FREEMSG;
  17. PutMsg(WTPort,&MyWTStdMsg->wt_Node);
  18. do 
  19.    {
  20.    MyWTStdMsg=(WTStdMsg*)(WaitPort(MyPort));
  21.    MyWTStdMsg=(WTStdMsg*)(GetMsg(MyPort));
  22.    }
  23. while (MyWTStdMsg==NULL);
  24. }
  25.  
  26.  
  27.  
  28. BOOL CREATEPORTS(char *PName)
  29.  
  30. {
  31. MyPort=CreateMsgPort();
  32. MyPort->mp_Node.ln_Pri=0;
  33. MyPort->mp_Node.ln_Name=PName;
  34. if (!(MyPort==NULL))
  35.    {
  36.    AddPort(MyPort);
  37.    MyWTStdMsg=(WTStdMsg*)(WaitPort(MyPort));
  38.    MyWTStdMsg=(WTStdMsg*)(GetMsg(MyPort));
  39.    WTPort=MyWTStdMsg->wt_Node.mn_ReplyPort;
  40.    }
  41. else return FALSE;
  42. return TRUE;
  43. }
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.